#include "Blocks/PumpkinBlock.h"

namespace PocketSurvival
{
    void PumpkinBlock::getDropValues(int32_t oldValue, int32_t newValue, int32_t toolLevel, std::vector<BlockDropValue> &dropValues)
    {
        BasePumpkinBlock::getDropValues(oldValue, newValue, toolLevel, dropValues);
		int32_t data = GetSize(Terrain::ExtractData(oldValue));
		if (GetSize(data) == 7 && GetIsDead(data) == false && m_random.getBool(0.5f))
		{
			dropValues.push_back(BlockDropValue{ 248, 1 });
		}
    }

    int32_t PumpkinBlock::getIndex()
    {
        return Index();
    }
    const std::string &PumpkinBlock::getBlockName()
    {
        static std::string blockName = "PumpkinBlock";
        return blockName;
    }
}